<?php
if(!$_SESSION['onemerchid'] || !$_SESSION['uid']){
	$url=custom_url('jy_merchscrm/login/',true);
	exi('','',$url);
}
if(!$_SESSION['wxworkapp_id']){
	$pid=pdo_getcolumn('core_plugins',array('name'=>'jy_merchscrm'),'id');
	$_SESSION['wxworkapp_id']=pdo_getcolumn('core_account_wxwork_app',array('pid'=>$pid,'merchid'=>$_SESSION['onemerchid'],'uniacid'=>$_SESSION['uniacid']),'id');
	if(!$_SESSION['wxworkapp_id']){
		$_SESSION['wxworkapp_id']=-1;
	}
}
$return['newheader']=1;
